﻿using System;
using System.Collections.Generic;
using System.Linq;
using Medianamik.Core;
using Medianamik.Core.Sugar;
using Medianamik.Globalization;
using Medianamik.UI.Web.MVP.Presentation;

namespace Medianamik.UI.Web.Shop.Presentation.Presenters
{
    public class EditAttributePresenter<TView>: NodeTypePropertyEditModulePresenter<TView>
        where TView : class, IEditAttributeView
    {
        public EditAttributePresenter(TView view)
            : base(view)
        {
        }

        public override string ReturnUrl
        {
            get
            {
                return base.ReturnUrl ?? Pages.AttributeList.AddParam(DefaultParamNames.TypeID, TypeId);
            }
        }

        protected override bool IncludeBaselookupNodeType
        {
            get
            {
                return false;
            }
        }

        protected override Guid? BaseLookupNodeType
        {
            get
            {
                return TypeIds.AttributeTypeBase;
            }
        }
    }
}
